package com.rinzin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @BelongsProject:springboot-web
 * @BelongsPackage:com.rinzin.controller
 * @Author:Rinzin
 * @CreateTime:2021-04-01-22-40
 * @Description:
 **/
@Controller
public class IndexController {
    @RequestMapping("/index")
    public String index(){
        return "index";
    }

    @RequestMapping("/index/data")
    public ModelAndView indexData(){
        ModelAndView modelAndView = new ModelAndView("indexdata");
        modelAndView.addObject("data","This is my first freemarker");
        return modelAndView;
    }
}
